from flask import Flask, request
from home import homeR
from news import newsR
from index import indexR
from user import userR
from flask_sqlalchemy import SQLAlchemy
from config import config

app = Flask(__name__)
app.config.from_object(config)

db = SQLAlchemy(app)

app.register_blueprint(indexR, url_prefix='/')
app.register_blueprint(userR, url_prefix='/users')
app.register_blueprint(homeR, url_prefix='/home')
app.register_blueprint(newsR, url_prefix='/news')

if __name__ == '__main__':
    #创建表
    # with app.app_context():
    #     db.create_all()
    app.run(debug=True)
